import { LAYOUT } from '@/router/constant'

const RouterName = 'demo'
const home = [
  {
    path: '/demo',
    name: RouterName,
    component: LAYOUT,
    meta: {
      title: 'demo',
      icon: 'icon-common',
      sortIndex: 4
    },
    children: [
      {
        path: 'a',
        name: `${RouterName}a`,
        component: () => import('@/views/demo/a.vue'),
        meta: {
          title: 'demo-a',
          authMark: 'abc',
          requireAuth: true
        }
      },
      {
        path: 'c',
        name: `${RouterName}c`,
        component: () => import('@/views/demo/c.vue'),
        meta: {
          title: 'demo-c',
          requireAuth: true
        },
        children: [
          {
            path: 'd',
            name: `${RouterName}d`,
            component: () => import('@/views/demo/d.vue'),
            meta: {
              title: 'demo-d',
              requireAuth: true
            }
          }
        ]
      }
    ]
  },
  {
    path: '/dmoo',
    name: RouterName + 'dd',
    component: LAYOUT,
    meta: {
      title: 'dmoo',
      icon: 'icon-common',
      sortIndex: 5
    },
    children: [
      {
        path: 'b',
        name: `${RouterName}b`,
        component: () => import('@/views/demo/b.vue'),
        meta: {
          title: 'demo-b',
          requireAuth: true
        },
        children: [
          {
            path: 'f',
            name: `${RouterName}f`,
            component: () => import('@/views/demo/f.vue'),
            meta: {
              title: 'demo-f',
              requireAuth: true
            }
          }
        ]
      },
      {
        path: 'e',
        name: `${RouterName}e`,
        component: () => import('@/views/demo/e.vue'),
        meta: {
          title: 'demo-e',
          requireAuth: true
        }
      }
    ]
  }
]

export default home
